All articles by Peter Baumgartner

Thumbnail image for Can Your Site Handle Going Viral?

Can Your Site Handle Going Viral?

It’s every publisher’s dream to “go viral” and reach thousands, if not millions, of new people. Many videos, tweets, images, articles, and infographics are created with exactly this goal in mind. But far too often, less thought goes into ensuring …
Thumbnail image for How to Choose a Web Development Agency in 2023

How to Choose a Web Development Agency in 2023

Your website is the hub of your business. It holds the promise of competitive advantage and the responsibility of delivering excellent customer service. Designing and building any new web application or restructuring your web development operations is a substantial undertaking, …
Thumbnail image for Python Package Manager Shootout

Python Package Manager Shootout

tl;dr I built a benchmark for Python Package managers, you can view it at https://lincolnloop.github.io/python-package-manager-shootout/ When starting a new Python project, you have a few different options for how you want to manage your dependencies. Like Node.js has npm, yarn, …
Thumbnail image for Choosing a Django Version

Choosing a Django Version

One of the first things you need to do when starting a new Django project is to choose which version of Django you are going to use. At any given time, there could be as many as three supported Django …
Thumbnail image for Distributed Locking in Django

Distributed Locking in Django

As you start scaling an application out horizontally (adding more servers/instances), you may run into a problem that requires distributed locking. That’s a fancy term, but the concept is simple. Sometimes you have to be sure that when a block …
Thumbnail image for Goodconf: A Python Configuration Library

Goodconf: A Python Configuration Library

I’ve been working quite a bit lately on streamlining Lincoln Loop’s standard deployment systems. One thorn we’ve always had is how to handle application configuration. In the past, we would have our configuration management system write the configuration out to …
Thumbnail image for Python Dependency Locking with pip-tools

Python Dependency Locking with pip-tools

Two of the biggest benefits pipenv and poetry are dependency locking and hash checking. Dependency locking means you can specify the direct dependencies your code requires, for example, celery==4.4.* and the tooling will lock, not only celery to a specific …
Thumbnail image for Dissecting a Python Zipapp Built with Shiv

Dissecting a Python Zipapp Built with Shiv

In a previous post, we showed how to use shiv to bundle a Django project into a single file for distribution and deployment. Running a large Python project as a single file feels like magic – which is great until …
Thumbnail image for Single-file Python/Django Deployments

Single-file Python/Django Deployments

This post covers portions of my talk, Containerless Django, from DjangoCon US 2018. Deploying Python has improved significantly since I started working with it over a decade ago. We have virtualenv, pip, wheels, package hash verification, and lock files. Despite …
Thumbnail image for Saying Goodbye to BotBot.me

Saying Goodbye to BotBot.me

Our venerable IRC logger, BotBot.me logged its first lines in the summer of 2012 . Since then, it has logged over 100 million lines for more than 400 IRC channels, primarily on the Freenode and Mozilla networks. Despite the rise …
Thumbnail image for Sandboxing Services with Systemd

Sandboxing Services with Systemd

With Ubuntu 14.04 (Trusty) now a year away from end-of-life, we’ve been planning and performing upgrades for the soon-to-be legacy OS. The biggest change is the move from Upstart to Systemd for managing services. It’s trivial to convert a service …
Thumbnail image for Logging to Systemd's Journal in Python

Logging to Systemd's Journal in Python

I’ll be the first to admit that I was skeptical about Systemd and its companion log aggregator Journald, but after working with if for a few months, I’ve seen the light (or drunk the Kool Aid… not sure). Typically I …
Thumbnail image for Goodbye manage.py

Goodbye manage.py

Every Django project starts with a manage.py file in its root. It’s a convenience script that allows you to run administrative tasks like Django’s included django-admin. In our last post, we discussed the merits of including a setup.py file in …
Thumbnail image for Django Logging, The Right Way

Django Logging, The Right Way

Good logging is critical to debugging and troubleshooting problems. Not only is it helpful in local development, but in production it’s indispensable. When reviewing logs for an issue, it’s rare to hear somebody say, “We have too much logging in …
Thumbnail image for Disabling Error Emails in Django

Disabling Error Emails in Django

One of Django’s nice “batteries included” features is the ability to send emails when an error is encountered. This is a great feature for small sites where minor problems would otherwise go unnoticed. Once your site start getting lots of …
Thumbnail image for Dynamic Test Servers with Salt

Dynamic Test Servers with Salt

One of the things I love about the DevOps movement is how (when done right) it empowers developers to work with infrastructure in a safe and controlled manner. Once you’ve nailed down deployments to a static set of servers (production, …
Thumbnail image for The Trouble with Thumbnails: Part 2

The Trouble with Thumbnails: Part 2

In this long overdue follow-up to Part 1, I’ll be discussing the infrastructure issues associated with creating and serving image thumbnails at scale. The naive solution to generating thumbnails is to declare the image sizes you want in your templates …
Thumbnail image for Django Patterns: Fat Models and cached_property

Django Patterns: Fat Models and cached_property

One of my favorite patterns in Django is the combination of “fat” models and cached_property from django.utils.functional. Fat models are a general MVC concept which encourages pushing logic into methods on your Model layer rather than the Controller (“view” in …
Thumbnail image for Django Anti-Patterns: Signals

Django Anti-Patterns: Signals

Django’s Signal Dispatcher is a really powerful feature that you should never use. Ok, it has valid use cases, but they may be rarer than you think. First, to dispel a misconception about signals, they are not executed asynchronously. There …
Thumbnail image for Multiple Sites with Routing in uWSGI

Multiple Sites with Routing in uWSGI

In another of our “you can do that?!?” with uWSGI posts, today I’ll show you how to use uWSGI to host multiple sites and properly route traffic based on the hostname to those sites. Multiple Sites (aka Emperor Mode) uWSGI …
Thumbnail image for 10 Years of Lincoln Loop

10 Years of Lincoln Loop

April marked Lincoln Loop’s 10th anniversary in business. As I reflect on that, I find myself going through all the typical platitudes: it’s been a roller-coaster ride, how proud I am of the team, looking forward to another 10 years, …
Thumbnail image for Serving Static Files with uWSGI

Serving Static Files with uWSGI

Serving Static Files with uWSGI As noted in a previous post, uWSGI is a Swiss Army knife of functionality. One of its features is a built-in static file server. When to Use uWSGI for Serving Static Files While it may …
Thumbnail image for The Trouble with Thumbnails: Part 1

The Trouble with Thumbnails: Part 1

Images are everywhere on the web. Whether you’re building a simple blog, a CMS, or a true web application, chances are good that you’ll need to deal with images. Editors, authors, users, etc. expect to be able to upload images …
Thumbnail image for Our Failed Kickstarter Was Really a Success

Our Failed Kickstarter Was Really a Success

Our Kickstarter campaign for a companion video series to our book High Performance Django ended today just shy of its target. We consider it a great success! That’s right… a success. When we started the campaign, our internal goal was …
Thumbnail image for The uWSGI Swiss Army Knife

The uWSGI Swiss Army Knife

uWSGI is one of those interesting projects that keeps adding features with every new release without becoming totally bloated, slow, and/or unstable. In this post, we’ll look at some of its lesser used features and how you might use them …
Thumbnail image for Speeding Up NPM Installs

Speeding Up NPM Installs

I’ve been working on improving our deployment processes as part of the High Performance Django Infrastructure project we’re building out. One consistent pain point is our front-end build system, and particularly, npm installs. For a number of reasons, instead of …
Thumbnail image for Fast Immutable Python Deployments

Fast Immutable Python Deployments

Alternate title: Pip 7 is Awesome, Here’s Why A typical Python deployment looks like this: Pave the server, setting up a virtualenv and installing any pre-requisites necessary to build/install the Python requirements (compiler, development headers, etc.). To update to a …
Thumbnail image for A Closer Look at Docker

A Closer Look at Docker

Part of my job at Lincoln Loop is to explore new technologies and make sure that, as a company, we stay current. I’ve been playing around with Docker for a while, but recently decided to redeploy some of our production …
Thumbnail image for High Performance Django Infrastructure Preview

High Performance Django Infrastructure Preview

One of the most common requests we’ve heard since releasing our book, High Performance Django is: “Do you have more code/configuration examples?” It’s a pretty loaded question because the book covers everything from Python code to deploying and configuring servers. …
Thumbnail image for Rate Limiting with Nginx

Rate Limiting with Nginx

Do you manage a website? Does it have a login form? Can somebody brute force attack it with every common username/password combination until they find one that works? For many small web applications, the answer to all of the above …
Thumbnail image for Django: From Runserver to Reddit Hugs

Django: From Runserver to Reddit Hugs

Last month, I presented High Performance Django: From Runserver to Reddit Hugs at DjangoCon US in Portland. My assertion was that Django, left to its own devices, does not scale. With the right supporting servers, however, it can scale fantastically. …
Thumbnail image for High Performance Django: Shipped

High Performance Django: Shipped

I’m excited to announce that our book, High Performance Django is officially complete. You can buy a copy at highperformancedjango.com now. Thank You Writing the book was hard work and there were definitely times where the challenge felt insurmountable. I …
Thumbnail image for Lessons Learned Architecting Realtime Applications

Lessons Learned Architecting Realtime Applications

Building realtime applications is a big change from how we’ve built websites in the past. Typically, realtime websites require each client holding open a long-running connection to the server so updates can be pushed down to the client immediately. This …
Thumbnail image for 2013 Year in Review

2013 Year in Review

2013 was an amazing roller coaster year at Lincoln Loop. This is a long post, so I’ll skip the intro and dive right in. Company Accomplishments Of all the things we did and built, I’m most proud of what we …
Thumbnail image for Introducing Salmon

Introducing Salmon

Over the years, I’ve used a lot of server monitoring systems. Big enterprisey ones like Zabbix, Zenoss, and Hyperic, smaller ones like munin and monit, stuff in the middle like Graphite, and hosted solutions like New Relic. Throughout the search, …
Thumbnail image for Goodbye Trailmapping

Goodbye Trailmapping

Trailmapping.com was a fun experiment with rapid development in Django I released almost 5 years ago now(!). I spoke about it at the first DjangoCon (also my first “real” talk in front of an audience). I didn’t give it much …
Thumbnail image for Lincoln Loop Retreat 2013

Lincoln Loop Retreat 2013

Over the last couple months we’ve been busy tying up loose ends and preparing for our first “official” company-wide retreat. Even though we’re a fully distributed team, we’re big believers in the power of meet-ups and face-time. They form bonds, …
Thumbnail image for Django Settings Parity: You're Doing It Wrong

Django Settings Parity: You're Doing It Wrong

A common paradigm in Django is to create different settings files for different environments (local, production, staging, etc.). Everyone has their own opinion on how to set these up (see ours here), that’s not what this post is about. Instead, …
Thumbnail image for 2012 Year in Review

2012 Year in Review

2012 was another amazing year at Lincoln Loop. I’m incredibly proud of the work we accomplished and the growth and development we’ve made as a company. A few of the highlights: We launched our first product, Ginger. It is critical …
Thumbnail image for Making the Distributed Workplace Work

Making the Distributed Workplace Work

In our last installment, I introduced our distributed workplace and why we prefer it over a traditional office. Over the years, we’ve learned a lot about how to make a distributed workplace, well… work. The single most important we learned …
Thumbnail image for Introducing BotBot

Introducing BotBot

Today we’re introducing a new member of the Lincoln Loop family, BotBot.me. At the moment, BotBot is beautiful hosted IRC logs (try #django or #go-nuts). We built it for people who love IRC and we want your advice to improve …
Thumbnail image for Realtime Replay Logs with Redis

Realtime Replay Logs with Redis

First off, realtime websites are hard. The current toolset is rudimentary. When I first started building Ginger, I thought I must be doing it wrong because of all the trial-and-error and pieces I was building from scratch. After watching Geoff …
Thumbnail image for The Distributed Workplace

The Distributed Workplace

Here’s a map of our current offices at Lincoln Loop: That’s 10 people, 5 timezones, and 3 continents for those of you counting at home. I use the term “office” loosely because we don’t have a central office in the …
Thumbnail image for Referrer Blocking is Hard

Referrer Blocking is Hard

One of my recent tasks in Ginger was to ensure that we weren’t leaking referrer URLs when you click on an external link in Ginger. It seemed like an easy task and one that’s probably been solved before. What I …
Thumbnail image for Backbone.js for Django Developers

Backbone.js for Django Developers

Our new product Ginger relies heavily on Backbone.js for most of the client-side functionality (you can read about our full web-stack here). Our JavaScript guru Marco built the initial prototype and then was pulled away by client work. I reluctantly …
Thumbnail image for At Lincoln Loop, Everyone Sets Their Own Salary

At Lincoln Loop, Everyone Sets Their Own Salary

As mentioned in my previous post, everyone at Lincoln Loop sets their own salary. It’s another radical divergance from the business norm that we borrowed from the book of Ricardo Semler. Every six months, I meet with each of our …
Thumbnail image for Open Book Finances

Open Book Finances

Maverick by Ricardo Semler was an eye-opening read for me a while back. It is a detailed account of his (highly profitable) company which is a radical departure from the traditional workplace. Rework (published over 20 years later) reads like …
Thumbnail image for Ginger Tech Stack

Ginger Tech Stack

For our latest product, Ginger, we wanted to marry the real-time functionality we needed with the traditional Django stack we know and love. After some false starts and falling on our faces in the beginning, we ended with a stack …
Thumbnail image for Down with 9 to 5

Down with 9 to 5

Development is a creative endeavor. Often developers are creating something where there was once nothing. For most us, the thought of being productive for 8 consecutive hours 5 days a week is laughable. 2-3 hours on a single problem is …
Thumbnail image for Introducing Ginger

Introducing Ginger

Our team of 10 is distributed across 8 countries and 3 continents. We have no central office. When we first started, a couple years might go by without ever meeting in person, now we meet in person for at least …
Thumbnail image for Get your (arcade) game on!

Get your (arcade) game on!

We love the Django community and to show our thanks, we’re throwing a private party Wednesday night for DjangoCon attendees. After dinner (9-11pm), come on down to Ground Kontrol, Portland’s favorite classic arcade. We’ll have an open bar (while supplies …
Thumbnail image for Filtering Results from Coverage.py

Filtering Results from Coverage.py

Coverage.py makes it easy to see how much of your code is covered by your test suite. It can be configured to spit out reports in XML (for consumption by a continuous integration server like Jenkins), in HTML (for human …
Thumbnail image for We're Hiring!

We're Hiring!

We’re looking for a Django developer to join our team. With the impending departure of Armin Ronacher to finish his degree, we’re going to be at least one developer short this Fall. We’re looking for somebody who can jump right …
Thumbnail image for Automated (No Prompt) Deployment with Pip

Automated (No Prompt) Deployment with Pip

We love pip and Fabric for Django deployment. You can see our boilerplate fabfile.py here. Pip, however, isn’t safe to run in an automated fashion. If you attempt to switch branches or repos for one of your editable requirements, you’ll …
Thumbnail image for Gondola for Real Estate Launch

Gondola for Real Estate Launch

I’m pleased to announce that Gondola for Real Estate, our GeoDjango-backed real estate CMS is publicly accepting new customers. A couple weeks ago, we quietly re-launched gondolacms.com with some details about the platform and what it has to offer, as …
Thumbnail image for Easy Fabric Deployment, Part 1: Git/Mercurial and SSH

Easy Fabric Deployment, Part 1: Git/Mercurial and SSH

We’re firm believers in the practices described by the Continuous Integration method of software engineering. Among those are: Maintain a code repository Automate the build Automate deployment We use git for our code repositories and Fabric to automate our build/deployment …
Thumbnail image for Highlighting Named Anchors with jQuery

Highlighting Named Anchors with jQuery

I’ve always disliked the way named anchors (<a href="#name">...</a>) behave in browsers. It jumps your viewport to a different part of the page, but it’s rarely obvious which section you have landed on. If the page is long enough, the …
Thumbnail image for Django Best Practices

Django Best Practices

This post got a bit long-winded, skip to the project announcment if you prefer. One of the things I love about Python and Django is the philosophy that there is one obvious way to do things. Standards make it easy …
Thumbnail image for Open Source Government

Open Source Government

While browsing the source code of President Obama’s latest web initiative, recovery.org, I noticed something of interest. <script type="text/javascript"><!--//--><![CDATA[//><!--jQuery.extend(Drupal.settings, { "basePath": "/" });//--><!]]></script> Wow, this can&#8217;t be true. Can it? $ curl -I http://www.recovery.gov HTTP/1.1 200 OK Cache-Control: must-revalidate Date: …
Thumbnail image for Satchmo Screencast

Satchmo Screencast

Satchmo is an amazing E-Commerce engine built on top of Django. After struggling in the past with difficult packages like ZenCart and OSCommerce, Satchmo’s ease of customization make it a joy to work with. Unfortunately, all the features can make …
Thumbnail image for On Static Media and Django

On Static Media and Django

We all know not to serve static media (images, CSS, Javascript, etc.) in production directly from Django. Thankfully, Django gives us some nice settings like MEDIA_URL and MEDIA_ROOT to make serving them a lot less painless. Lately, however, I’ve come …
Thumbnail image for Serving Django Projects (Revisited)

Serving Django Projects (Revisited)

After reading the comments on my last post on the subject, I realized there was definitely some room for improvement in my strategy. This is take two of the original post. Problems My original strategy had a couple of downfalls: …
Thumbnail image for Introduction to Gondola

Introduction to Gondola

Gondola is our content management system built on top of Django. I briefly showed it off during my DjangoCon Lightning Talk, but have been wanting to give it a proper screencast for a while. Here’s an introduction: A few common …
Thumbnail image for Django for Hire

Django for Hire

Lincoln Loop has been in “head down” mode for the last couple months. In addition to being knee deep in client projects, we have grown from a one-man development studio to a full-fledged Django development shop/consultancy. We are proud to …
Thumbnail image for Getting RequestContext in Your Templates

Getting RequestContext in Your Templates

Lately, we’ve been taking over projects from people who began building their first site in Django, but either got in over their head or just found they didn’t have the time to continue. As I review the existing code, the …
Thumbnail image for Google App Engine First Impressions

Google App Engine First Impressions

For those of you that have been hiding under a rock for the last 12 hours, App Engine is Google’s answer to Amazon Web Services. While it is less flexible in some senses (you don’t have a complete OS at …
Thumbnail image for Reusable Django Apps and Forking

Reusable Django Apps and Forking

One of the things that drew me towards Django was the idea of being able to create reusable applications that would sit on my PYTHONPATH instead of copied across multiple sites. Coming from WordPress, the constant security updates that required …
Thumbnail image for Serving Django via CherryPy

Serving Django via CherryPy

Download django-cpserver Now at GitHub Background A few months ago, I got sick of trying to deploy Django sites on my cPanel server and got a VPS at Slicehost. Thanks to SuperJared, setting up Apache/mod_python behind an Nginx frontend was …
Thumbnail image for Django FormMail Clone

Django FormMail Clone

Here’s a little nugget I just posted to Django Snippets. It emulates the behavior of an old Perl script I used way back when, FormMail.pl. I often find myself needing to build a form whose contents get emailed to the …
Thumbnail image for Better Use of Newforms

Better Use of Newforms

The newforms library is a huge time-saver, but when I first started using it, I still found myself writing tedious repetitve code to get it to function how I wanted. While I could get away with it on smaller sites, …
Thumbnail image for Cash Offers Fast Site

Cash Offers Fast Site

We recently built and launched CashOffersFast.com. It gives people an easy, no-risk way to put their home up for sale. Pre-qualified investors can then make anonymous bids on any home listed with the site. We worked very closely with the …
Thumbnail image for Lincoln Loop Version 2

Lincoln Loop Version 2

I’ve been wanting to update my website for quite a while. It got to the point that I wasn’t referring people to my old site because it had become such a poor representation of what Lincoln Loop has evolved into. …
Thumbnail image for Eating My Own Dog Food

Eating My Own Dog Food

I’ve been kicking around the idea of switching hosting providers for a while. I finally took the plunge and if you’re reading this, it is being served off the new platform. I’m going to be eating my own dog food …
Thumbnail image for Annoyed

Annoyed

Hey Adobe, Progress bars are meant to indicate progress. When they sit in one place for 20+ minutes, it makes people think progress has stopped and something is broken. I shouldn’t have to check my running processes to see if …
Thumbnail image for Bee Herz, Psychic Medium Site

Bee Herz, Psychic Medium Site

Our latest site launch was for Bee Herz, a local psychic medium. The elegant design was done by ashwebmedia with coding done here at Lincoln Loop.
Thumbnail image for Prudential Steamboat Realty

Prudential Steamboat Realty

A few weeks ago, I released Prudential Steamboat Realty’s new site into the wild. It is my first (but not last) large site built in Django to go live. As usual, ashwebmedia did a great job on redesigning the site …
Thumbnail image for Lincoln Loop Goes Green

Lincoln Loop Goes Green

I’m proud to announce that, as of today, Lincoln Loop, LLC has become a completely carbon neutral business. Our footprint was pretty minimal to start. Our shared server, Olivia, only draws about 180 watts or 1 ton of CO2 a …
Thumbnail image for Goodbye WordPress, I'm Leaving You

Goodbye WordPress, I'm Leaving You

WordPress, you seemed perfect at first. You saved me lots of development time, seemed to have a plugin for everything I needed, and a user interface that was easy for anybody to use. The honeymoon has worn off though. It …
Thumbnail image for Bear Lodge Site

Bear Lodge Site

Just put the final touches on www.bearlodgesteamboat.com. It is a WordPress site designed by ashwebmedia, then hand-coded into a custom WordPress theme at Lincoln Loop.
Thumbnail image for Waterside Day Spa Site

Waterside Day Spa Site

The new Waterside Day Spa site is out the door. The site was built using WordPress as the backend CMS with a custom theme developed by myself and designed by the talented Derek Ashauer of ashwebmedia. Overall, I’m very pleased …
Thumbnail image for Basecamp SVN Integration

Basecamp SVN Integration

As promised, here is the follow-up to the SVN for Web Developers post, Basecamp integration. Why? Transparency is very important to my business. The #1 complaint I hear about web developers is that they rarely meet deadlines and the client …
Thumbnail image for Subversion for Web Developers

Subversion for Web Developers

I switched from Ubuntu Linux to a Mac last week. I knew the new system would force me to adapt my workflow a bit so I figured it would be a good opportunity to break some bad habits. One of …
Thumbnail image for The Victoria Site

The Victoria Site

I just wrapped up development on a website for The Victoria, a high-end mixed use development in downtown Steamboat. Derek at ashwebmedia is the designer behind the site. It is the first work we’ve done together and he really nailed …
Thumbnail image for Long Live Lincoln Loop

Long Live Lincoln Loop

A copy of this letter went out to the NDS Internet client list today. I am pleased to announce that as of April 1, 2007, NDS Internet will become Lincoln Loop, LLC, Steamboat Springs’ only company dedicated exclusively to website …